Path_2_Spline-Plugin

  • Would You like to read the English Version ...
  • ... oder hätten Sie es lieber in Deutsch?

 
First I have to confess, that I'm from Germany and had to learn English at school, (they said I didn't very well, and I think they were right), so we've got two problems:
1.) My bad English
2.) I don't know how Cinema looks like on your Computer. So there may be some some wrong terms in this document.
But this may not be too serious because "Path2Spline" is a very simple (not to say primitive) program.
"Path2Spline" takes a trajectory of an object and converts it to a spline.
Why should anyone want to do that?
An obvious reason is that you can see the curve an object moves along.
You can animate a vehicle first and build the street afterwards. A short example will demonstrate this.
Like (nearly) all files with suffix "COF" it has to be copied into the directory "PLUGIN". The program is intended for use with Cinema 5.10.

 
First you need a selected object which does some movement. Then you start the program with tools/plugin/Path_2_Spl.
A dialog window appears and you can read the name of the object in the headline.
Later "Path2Spline" will inspect all frames of the animation and record the position of the selected object. All frames? No! In the first line you can specify the startframe and the endframe. Startframe may be greater than endframe.
In the next line you have to decide, if you want a spline which is closed or which is not closed. If you want a closed spline change the default "No" to something else, for instance "Yes".
On the right side you can choose if Cinema should apply tangents to the spline.
In the last field you can determine the name of the spline.

 
Objectmanager
C
P
M1
M2

In the ZY-view above, you can see four objects. Let's call them from left to right C, M1, P and M2. They are linked as you can see it on the right side.
Now we need an animation!
We create angle tracks(?) for C and P with keys at the start and the end of the animation.
For both objects the startkey is all zero.
The endkey of C has H = 360°
The endkey of P has P = 180°
Now P should move on a circle, and M1 and M2 should swap their positions.
Select M1 and run "Path2Spline". You can ignore the dialog, but it's usually not a bad idea to use the name field.
You can see then curve?
Repeat this procedure for object M2.
Select objects/NURBS/loft-object(?) and link the two splines to it.
The result is something like the picture at the top of this document, which is called (in Germany) "Möbiusband".

 
This is a totally unordered list of annotations, which didn't quite fit to the rest of this document. Either they had blown up the text unreasonably or I've simply forgotten them.

  • Of course you may edit the program as you please.
    I've written it in about half an hour, in fact it is a small part of another program, so there is much to improve.
    For instance, "Path2Spline" produces very much splinevertices, for each frame one, so somebody should do something to avoid this.
  • As mentioned above, "Path2Spline" is written for Cinema 5.10. I'm not quite sure, if older versions can execute the program. If not, try to answer the "tangentquestion" with "No".
  • Why such big a document for such small a program?
    Well, somebody had to test my first HTML-file!
  • Contact:motion-gimmick@os-net.de


 
"Path2Spline" steht für "Path to Spline" und bedeutet nichts anderes als die Umwandlung einer Bahnkurve eines beliebigen Objektes in einen Spline.
Warum sollte man das wollen?
Eine simple Anwendung ist z.B. das Sichtbarmachen von Bahnkurven.
Man kann aber auch daran denken, ein Auto erst zu animieren und anschließend die passende Straße zu modellieren.
Ein Beispiel im letzteren Sinne folgt weiter unten.
Wie (fast) alle Dateien mit der Endung "COF" gehört das Programm in den Ordner "PLUGIN". Entwickelt und getestet wurde es mit Cinema 5.10.
.

 

"Path2Spline" ist ein sehr simples (um den Ausdruck "primitiv" zu vermeiden) Programm und die Bedienung ist es auch.
Zunächst benötigt man irgendein selektiertes Objekt, das irgendeine Bewegung ausführt. Dann startet man das Programm via Werkzeug/Plugins/Path_2_Spl.
Das übliche Eingabeformular erscheint und man sieht in der Überschrift den Namen des Objektes.
In der ersten Zeile wird man aufgefordert Start- bzw. Endframe(=Bild) anzugeben. "Path2Spline" wird nämlich die Animation durchgehen und für alle Bilder, die zwischen Start- und Endframe (einschließlich) liegen, die Position des Objektes aufzeichnen. Der Startwert darf durchaus größer als der Endwert sein!
In der nächsten Zeile steht man vor der Entscheidung, ob man den Spline, das Ergebnis der Arbeit von "Path2Spline", closed (=geschlossen) haben möchte oder lieber nicht. Falls man tatsächlich einen geschlossenen Spline haben möchte, muss man nur das vorgeschlagen "No" in irgendetwas anderes abändern.
Rechts daneben hat man die Wahl, ob Cinema Tangenten an den Spline legen soll oder nicht. In der Regel wird man dieses Feld wohl so lassen, wie es ist.
Zu Schluß kann man dem Spline noch einen anderen Namen als "path" geben. Dieses Feld muß wohl nicht näher erklärt werden.

 

Objektmanager
Z
K
B1
B2

In dem obenstehenden ZY-Ansicht sieht man vier Körper entlang der Z-Achse aufgereiht. Nennen wir sie, von links nach rechts, Z, B1, K und B2. Im Objektmanager sind sie wie angegeben hierarchisch verknüpft
Jetzt brauchen wir noch eine Animation!
In der Zeitleiste erzeugen wir für Z und K jeweils eine Winkel-Spur und zwar mit Keys für Bild 0 und für das letzte Bild.
Die Keys für Bild 0 sind alle 0.
Für Z geben wir bei H den Wert 360° ein.
Für K geben wir bei P den Wert 180° ein.
Ein Probelauf sollte ergeben, daß sich K auf einer Kreisbahn bewegt und daß B1 und B2 die Plätze tauschen.
Als nächstes selektieren wir B1 und starten "Path2Spline". Die vorgeschlagenen Werte können wir so akzeptieren, wie sie dort stehen, obwohl es sicher eine gute Idee ist einen Namen zu vergeben.
Jetzt sollte die Bahnkurve von B1 sichtbar sein.
Das gleiche Spiel machen wir nun mit B2, also selektieren und "Path2Spline".
Nun wählen wir Objekte/NURBS/Loft-Objekt und machen die beiden Splines zu Unterobjekten.
Als Ergebnis bekommt man etwas wie das Titelbild dieser Anleitung, nämlich ein Möbiusband.

 
Das folgende ist eine Liste völlig zusammenhangloser und ungeordneter Bemerkungen, die entweder den Rest des Textes unnötig aufgebläht hätten oder die mir einfach zu spät eingefallen sind.

  • Selbstverständlich dürfen Sie das Programm verändern und erweitern.
    So wie es ist, ist es die Arbeit einer halben Stunde und alles andere als perfekt. Im Grunde ist es nur ein Nebenprodukt eines anderen Programmes, an dem ich gerade arbeite.
    Z.B. erzeugt "Path2Spline" sehr viele Splinepunkte, immerhin für jedes Bild einen, hier wäre Abhilfe wahrscheinlich dringend erforderlich.
  • Wie oben gesagt ist das Programm für Cinema 5.10 gedacht. Falls eine ältere Version "Path2Spline" nicht ausführen kann, sollte man versuchen die "Tangenten-Frage" mit nein zu beantworten.
  • Warum so eine Riesenanleitung für ein so kleines Programm?
    Würden Sie sonst meine erste HTML-Seite testen?
  • Kontakt:motion-gimmick@os-net.de